
import random
heights = [random.randint(150,190) for i in range(20)]
weights = [random.randint(40,100) for i in range(20)]

result = list(map(lambda x,y: y / (x / 100) ** 2, heights,weights))
print(result)
bmi = list(filter(lambda num: num >= 24,result))
print(bmi)

# def my_rule(num):
#     return True if num >= 0 and num % 2 == 0 else False
        

# list_a = [random.randint(-20,20) for i in range(30)]
# print(list_a)
# result = filter(lambda num: num >= 0 and num % 2 == 0,list_a)
# print(list(result))


# print(list_a)
# print(my_rule(-4))